import {
	IApp,
	IAppCodeListHelper,
	IAppFunc,
	IAppFuncHelper,
	IContext,
	IGlobalActionHelper,
	IDialogHelper,
	INotificationHelper,
	IOpenViewHelper,
	IParam,
	IViewLogicHelper,
	ILoadingHelper,
	IAppViewMsgHelper,
	IAppCounterHelper,
	IEntityDetail,
	IGlobalNotificationHelper,
	IProjectSetting,
	IDevActionHelper,
	IAppConfig,
	ICustomDialogOptions,
} from '@/core/interface';
import { IAppData } from '@/core/interface/app/i-app-data';

/**
 * 应用控制器（项目需继承实现）
 *
 * @export
 * @abstract
 * @class AppController
 * @implements {IApp}
 */
export abstract class AppController implements IApp {
	getDevActionHelper(): IDevActionHelper {
		throw new Error('Method not implemented.');
	}
	/**
	 * 获取应用功能辅助类
	 */
	getAppFuncHelper(): IAppFuncHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取打开视图辅助类
	 */
	getOpenViewHelper(): IOpenViewHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用代码表辅助类
	 */
	getAppCodeListHelper(): IAppCodeListHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用视图消息辅助类
	 */
	getAppViewMsgHelper(): IAppViewMsgHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取计数器辅助类
	 */
	getAppCounterHelper(): IAppCounterHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用加载辅助类
	 */
	getAppLoadingHelper(): ILoadingHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取全局界面行为辅助类
	 */
	getGlobalActionHelper(): IGlobalActionHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取视图逻辑辅助类
	 */
	getViewLogicHelper(): IViewLogicHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取全局通知助手类
	 *
	 * @return {*}  {IGlobalNotificationHelper}
	 * @memberof AppController
	 */
	getGlobalNotificationHelper(): IGlobalNotificationHelper {
		throw new Error('Method not implemented.');
	}
	/**
	 * 获取数据服务
	 * @param name
	 * @param context
	 */
	getDataService(name: string, context?: IContext | undefined): Promise<any> {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取界面服务
	 * @param name
	 * @param context
	 */
	getUIService(name: string, context?: IContext | undefined): Promise<any> {
		throw new Error('Method not implemented.');
	}

	/**
	 * 设置界面应用对象
	 * @param UIApp
	 */
	setUIAppInstance(UIApp: IParam): void {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取界面应用对象
	 */
	getUIAppInstance(): IParam | undefined {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用功能配置
	 */
	getAppFuncConfig(): IAppFunc[] {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用视图配置
	 */
	getAppViewConfig(): IParam {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用主题配置
	 */
	getAppThemeConfig(): IParam[] {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取项目设置
	 */
	getProjectSetting(): IProjectSetting {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取代码表配置
	 */
	getAppCodeListConfig(): IParam {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取计数器配置参数
	 */
	getAppCounterConfig(): IParam {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取视图消息配置
	 */
	getAppViewMsgConfig(): IParam {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用实体配置
	 */
	getAppEntityConfig(): IEntityDetail[] {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用配置
	 *
	 * @return {*}  {IAppConfig}
	 * @memberof AppController
	 */
	getAppConfig(): IAppConfig {
		throw new Error('Method not implemented.');
	}

	/**
	 * 消息提示辅助类
	 */
	getNotificationHelper(): INotificationHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 对话框提示辅助类
	 */
	getDialogHelper(): IDialogHelper {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用数据
	 */
	getAppData(): IAppData {
		throw new Error('Method not implemented.');
	}

	/**
	 * 清除应用数据
	 */
	clearAppData(): boolean {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取应用是否启用权限
	 */
	getEnableAppPermission(): boolean {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取指定菜单是否存在权限
	 * @param tag 菜单权限标识
	 */
	getAppMenuAuth(tag: string): boolean {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取指定统一资源是否存在权限
	 * @param tag 统一资源标识
	 */
	getAppUniresAuth(tag: string): boolean {
		throw new Error('Method not implemented.');
	}

	/**
	 * 用户登录
	 */
	login(): void {
		throw new Error('Method not implemented.');
	}

	/**
	 * 用户登出
	 */
	logout(): Promise<IParam> {
		throw new Error('Method not implemented.');
	}

	/**
	 * 关于系统
	 */
	aboutSystem(): void {
		throw new Error('Method not implemented.');
	}

	/**
	 * 翻译
	 * @param resTag  语言标识
	 * @param str 源字符
	 */
	ts(resTag: string, str = ''): string {
		throw new Error('Method not implemented.');
	}

	/**
	 * 关闭应用页面
	 *
	 */
	closeView() {
		throw new Error('Method not implemented.');
	}

	/**
	 * 关闭应用loadding
	 *
	 */
	closeAppLoadding(): void {
		throw new Error('Method not implemented.');
	}

	/**
	 * 获取视图关闭提示
	 *
	 * @param {string} tag 视图标识
	 * @return {*}  {ICustomDialogOptions}
	 * @memberof AppController
	 */
	getViewCloseHint(tag: string): ICustomDialogOptions {
		throw new Error('Method not implemented.');
	}
}
